home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / fontutil.6 / fontutil / fontutils-0.6 / widgets / BitmapP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-27  |  2.4 KB  |  92 lines

  1. /* BitmapP.h: private definitions for the Bitmap widget, which allows
  2.    editing of a bitmap.
  3.  
  4. Copyright (C) 1992 Free Software Foundation, Inc.
  5.  
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #ifndef BITMAP_WIDGET_PRIVATE_H
  21. #define BITMAP_WIDGET_PRIVATE_H
  22.  
  23. #include <X11/IntrinsicP.h>
  24. #include <X11/CoreP.h>
  25. #include <X11/Xaw/SimpleP.h>
  26. #include <X11/Xaw/LabelP.h>
  27.  
  28. #include "Bitmap.h"
  29.  
  30. /* New fields in the Bitmap widget class record, i.e., data applicable
  31.    to every instance of the widget.  */
  32. typedef struct
  33. {
  34.   int dummy;
  35. } BitmapClassPart;
  36.  
  37. /* The full class record structure.  */
  38. typedef struct _BitmapClassRec
  39. {
  40.   CoreClassPart core_class;
  41.   SimpleClassPart simple_class;
  42.   LabelClassPart label_class;
  43.   BitmapClassPart bitmap_class;
  44. } BitmapClassRec;
  45.  
  46. extern BitmapClassRec bitmapClassRec;
  47.  
  48.  
  49. /* New fields in the Bitmap widget record, i.e., data specific to one
  50.    instance of the widget.  */
  51. typedef struct
  52. {
  53.   /* New resources; see Bitmap.h for documentation.  */
  54.   Dimension expansion;
  55.   XtPointer bits; /* Points to a `bitmap_type'.  */
  56.   Boolean modified;
  57.   Widget shadow;
  58.   
  59.   /* Private state.  */
  60.  
  61.     /* The GC for the editing.  */
  62.   GC edit_gc;
  63.   
  64.     /* The current selection, or NULL.  */
  65.   bitmap_type *selection;
  66.  
  67.     /* The initial corner of the selection, in window coordinates.  */
  68.   coordinate_type initial_select;
  69.   
  70.     /* The current upper left corner of the selection, in window
  71.        coordinates.  */ 
  72.   coordinate_type select_ul;
  73.   
  74.     /* The current width and height of the selection, in window dimensions.  */
  75.   unsigned select_width, select_height;
  76.     
  77.     /* The GC for showing the selection.  */
  78.   GC select_gc;
  79. } BitmapPart;
  80.  
  81.  
  82. /* The full instance record structure.  */
  83. typedef struct _BitmapRec
  84. {
  85.   CorePart core;
  86.   SimplePart simple;
  87.   LabelPart label;
  88.   BitmapPart bitmap;
  89. } BitmapRec;
  90.  
  91. #endif /* not BITMAP_WIDGET_PRIVATE_H */
  92.